/**
 * 广寒宫
 * 网址:www.guanghangong.xyz
 */
package org.moon.framework.autoconfigure.feign;

import org.moon.framework.autoconfigure.feign.interceptor.FeignRequestInterceptor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import feign.Logger;
import feign.RequestInterceptor;

/**
 * feign
 * 
 * @author ninglong
 */
@Configuration
@ConditionalOnClass({ RequestInterceptor.class })
public class FeignAutoConfiguration {
	@Bean
	public Logger.Level feignLoggerLevel() {
		return Logger.Level.FULL;
	}

	@Bean
	public FeignRequestInterceptor basicAuthRequestInterceptor() {
		return new FeignRequestInterceptor();
	}
}
